import Vue from 'vue'  
import VueRouter from 'vue-router'  
import ProductList from '@/components/ProductList.vue' // 假设ProductList组件稍后在components文件夹中定义  
import Cart from '@/components/CartC.vue'  
  
Vue.use(VueRouter)  
  
const routes = [  
  {  
    path: '/products',  
    name: 'ProductList',  
    component: ProductList  
  },  
  {  
    path: '/cart',  
    name: 'Cart',  
    component: Cart  
  }  
]  
  
const router = new VueRouter({  
  mode: 'history',  
  base: process.env.BASE_URL,  
  routes  
})  
  
export default router